<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
 <head>
  <title>inputEx - Textarea Usage</title>

<!-- YUI CSS -->
<link rel="stylesheet" type="text/css" href="../lib/yui/reset-fonts/reset-fonts.css">
<link rel="stylesheet" type="text/css" href="../lib/yui/container/assets/container.css"> 
<link rel="stylesheet" type="text/css" href="../lib/yui/assets/skins/sam/skin.css">

<!-- InputEx CSS -->
<link type='text/css' rel='stylesheet' href='../css/inputEx.css' />

<!--[if IE 6]>
<link type='text/css' rel='stylesheet' href='../css/inputEx-IE6.css' />
<![endif]-->

<!-- Demo CSS -->
<link rel="stylesheet" type="text/css" href="css/demo.css"/>
<link rel="stylesheet" type="text/css" href="css/dpSyntaxHighlighter.css">

 </head>

 <body>

<h1>inputEx - Textarea Usage</h1>


<!-- Example 1 -->
<div class='exampleDiv'>
	<h2>Basic Textarea creation</h2>
	<p>Use the following code to create a basic inputEx Textarea.</p>
	<div class='demoContainer' id='container1'></div>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
		new inputEx.Textarea({parentEl: 'container1', value: 'Textarea can contain\nmultiline text !\n'});
		</textarea>
	</div>
</div>



<!-- Example 2 -->
<div class='exampleDiv'>
	<h2>Textarea setValue/getValue</h2>
	<p>Test of the setValue, getValue methods</p>
	<div class='demoContainer' id='container2'></div>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
			var div = YAHOO.util.Dom.get('container2');
			var textField = new inputEx.Textarea({parentEl: div, showMsg:true, required:true});

			var button1 = inputEx.cn('button', null, null, "SetValue");
			div.appendChild(button1);
			YAHOO.util.Event.addListener(button1, "click" ,function() { 
				textField.setValue('Textarea can contain\nmultiline text !\n'); 
			});

			var button2 = inputEx.cn('button', null, null, "GetValue");
			div.appendChild(button2);
			YAHOO.util.Event.addListener(button2, "click" ,function() { 
				alert(textField.getValue());
			});
		</textarea>
	</div>
</div>


<!-- Example 3 -->
<div class='exampleDiv'>
	<h2>Change Textarea size</h2>
	<p>Set the size using "rows" and "cols" attributes.</p>
	<div class='demoContainer' id='container3'></div>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
			new inputEx.Textarea({parentEl: 'container3', value: 'Set the size...\nusing "rows" and "cols" attributes !\n', rows: 8, cols: 40});
		</textarea>
	</div>
</div>

<!-- Example 4 -->
<div class='exampleDiv'>
	<h2>More options</h2>
	<p>Set the min/max length, typeInvite...</p>
	<div class='demoContainer' id='container4'></div>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
			new inputEx.Textarea({parentEl: 'container4', showMsg:true, required:true, typeInvite:"Type text here", minLength:10, maxLength:20, name: "Test4"});
		</textarea>
	</div>
</div>

<!-- YUI Library -->
<script type="text/javascript" src="../lib/yui/utilities/utilities.js"></script>
<script type="text/javascript" src="../lib/yui/container/container-min.js"></script>

<!-- InputEx -->
<script src="../js/inputex.js"  type='text/javascript'></script>
<script src="../js/Field.js"  type='text/javascript'></script>
<script src="../js/fields/StringField.js"  type='text/javascript'></script>
<script src="../js/fields/Textarea.js"  type='text/javascript'></script>

<!-- inputEx examples -->
<script src="js/dpSyntaxHighlighter.js"></script>
<script src="inputex-examples.js"></script>

 </body>
</html>